package com.thb.user.memcached;

public class MKeyUtils {
	
	public static final int  Sid_Default_Time = 7*24*60*60;
	
	//user
	private static String UserKey = "api:user:email";
	
	private static String UserUIDKey = "api:user:uid";
	
	//userinfo
	private static String UserInfoKey = "api:userinfo:uid";
	
	//user
	private static String SidUserKey = "api:sid";
	
	private static String UserPasswdForgetRandomKey = "user:passwd:forget";
	
	public static String getUserKey(String email){
		return String.format("%s:%s",UserKey, email);
	}
	
	public static String getUserUidKey(String uid){
		return String.format("%s:%s",UserUIDKey, uid);
	}
	
	public static String getUserInfoKey(String uid){
		return String.format("%s:%s",UserInfoKey, uid);
	}
	
	public static String getSidUserKey(String sid){
		return String.format("%s:%s",SidUserKey, sid);
	}
	
	public static String getForgetPasswdKey(String email){
		return String.format("%s:%s",UserPasswdForgetRandomKey, email);
	}
	
	private static final String UserCodeKey="api:usercode";
	
	public static String getUserCodeKey(String usercode){
		return String.format("%s:%s", UserCodeKey,usercode);
	}
	
	private static final String UserCountKey="api:usercount";
	
	public static String getUserCountKey(){
		return String.format("%s", UserCountKey);
	}
	
	
	
}
